Logs

HostMonitor can log application events to a log files. Different log detail levels and log file formats (HTML, Text or DBF) can be configured to suit your needs.
HostMonitor has several logging options

  • common log
  • private log
  • ODBC log
  • system log


    Common Log

    HostMonitor maintains a single log file called common log that is shared by all tests defined in the working test list. All events that are subject to logging (according to test's configuration) get recorded in the common log. All aspects of the common log's behavior are controlled through Options -> Log settings.
    As far as log destination is concerned, you can either specify a particular file name for the common log, or choose a naming pattern to have HostMonitor switch to a different file every day, month, year, etc., as prescribed by the date macro variables appearing in the pattern. You can also choose to have no common log at all.
    It is also possible to configure the common log as to when information should be written. The "Save all information" option tells HostMonitor to add a record every time a test is performed. If, however, the opposite option is selected, "Save only if host status changes", no logging happens as consecutive tests return same status value, until the status changes, at which point a new log record is added. While the second option is obviously more space-efficient, the first one allows you to build up statistics on helpful test parameters like response time, reply value, etc. This statistical information can be then parsed and visualized by the built-in tool called Log Analyzer.
    By the way, you may change logging mode for particular tests in the Test Properties dialog by choosing one of the options:

    • Default - the common settings defined in the Options dialog are used;
    • Brief - record information whenever status of the test changes;
    • Full - record all test results, regardless of whether their status had changed or not;
    • Reply - record information into log every time the status or reply value of the test changes.
    If you do not want the common log to grow uncontrollably, you can set an upper limit. When the file reaches its limit, logging starts over from the beginning.

    HostMonitor supports three different log formats: plain text, HTML and DBF, each of which has its own strengths:

    Plain text:
  • Text log is the most compact of the three formats (about 80 bytes per record)
  • All fields in a text log are delimited with Tab (09), so you can easiliy import the data from a text log into a spreadsheet or a database

    HTML:
  • HTML logs are more visual;
  • HTML logs can be made automatically available over the Web;
  • on the flip side, HTML logs take up a lot more disk space (about 800 bytes per record) than text or DBF logs.

    DBF:
  • DBF logs are relatively compact (173 bytes per record).
  • DBF log data is easy to analyze and manipulate, or import into another DBMS
  • The date and time formats used internally in DBF files do not depend on the system's regional setings. Therefore, changing the system date/time formats has no effect on Log Analyzer's ability to interpret those log elements, which is not the case with the text format (if you choose to keep your log in a text file, and then change the system date/time format, Log Analyzer may have difficulties calculating test parameters of the date/type type, like the alive/dead time). To avoid this problem, turn on the "Use fixed date&time formats" option located on the Miscellaneous page in the Options dialog. In this case, HostMonitor will use the date&time formats specified, regardless of the system settings.

    For more information on log settings see Options -> Log Settings.


    Private Log

    Additionally, for each test you can define its own, "private" log file. The type of a private log is determined based on the file extension: HTML for .htm*, DBF for .dbf, plain text for any other extension.
    Private logs can be configured to work in one of the following modes:

    • Default - the common settings defined in the Options dialog are used;
    • Brief - record information whenever status of the test changes;
    • Full - record all test results, regardless of whether their status had changed or not;
    • Reply - record information into log every time the status or reply value of the test changes.
    If a private log is specified, the popup menu for that test will contain the item, "View private log".


    ODBC Log

    Starting with version 3.0, HostMonitor can write log information into any ODBC data source (e.g Oracle or MS SQL database). The query to logging test data is entirely up to you. Use the macro variables to put in as much detail as you want. For instance, your log SQL command might look like this:
    INSERT INTO HMLOG (DATE1, TIME1, TEST_NAME, STATUS, REPLY) VALUES (%Date%, '%Time%', '%TestName%', '%Status%', '%Reply%')
    Note: An appropriate database table has to be created before you start using the ODBC logging. For more information see Options -> Advanced Logs.


    System Log

    System log is yet another log type. HostMonitor uses the system log to record events like start/stop monitoring, as well as information on started and/or failed alert actions. Destination-wise, system log information can be written either into the same file used by the common log, or into a dedicated file as specified on the Advanced Logs page in the Options dialog.
     

  • Log Viewer

    To view log files, you can use either the built-in viewer, associated programs or an external program. You can setup different viewers to view different log types. For example, to view an HTML log file you can use the associated program (your default web browser); to view a text log file you can use the build-in log viewer, etc.
    See Options -> Log Viewers.
    With the built-in log viewer, you can view any of the supported log types (HTML, Text, DBF). The viewer supports sorting, which allows you to order log records by any field (time, test name, status, reply value, etc).

    Log Analyzer

    Advanced Host Monitor package includes Log Analyzer. Log Analyzer is a graphical tool that visualizes the log data. It parses the contents of a log file and presents the data as a variety of charts representing different test statistics. Log Analyzer may analyze all types of log files: HTML, Text, and DBF log files. In a second, administrator can get a snap shot of the host performance over a period of days or even months.
    Several examples of the reports that were generated by Log analyzer:
      Example #1
      Example #2
      Example #3


    Reports

    HostMonitor can generate reports at regular intervals and/or when some tests change their status. Reports can be in either HTML, DBF, WML, or Text formats. The highly flexible Report Manager allows you to create and customize reports to your liking in a variety of ways. Also note that each folder may contain its own list of reports, and each of the reports can be set up with a launching schedule specific to that folder. With reports, you can easily check the status of your network from anywhere using a Web browser or your WAP cell phone. Examples: HTML Report, Compact-Block, Compact-Table, Custom Report1, Custom Report2.
    DBF report useful for analyzing (after generating reports HostMonitor can launch an external program for analyzing or other purposes).

    A list of up to 6 global reports (reports that apply to all tests in the working HML file) can be defined on the Reports page in the Options dialog. Additionally, each folder may have its own list of reports; only the tests contained in the folder will be used in generating these folder-specific reports. There are two more parameters that can be specified for both global and folder-specific reports:

  • time interval - tells HostMonitor how often reports should be generated
  • external program to execute - if specified, HostMonitor will launch the external program after reports have been generated.

    It is also possible to have HostMonitor generate a report every time a test changes its status. This can be done by adding "Generate reports" action to the Action Profile. The other way to implement the same behavior would be to add a "Run HMS Script" action, and include a CreateReport command in the script to execute.

    Also note that reports can be generated at user request at any time through the Reports menu in HostMonitor's main window.
     

  • Macros


    When you provide the name of the common or private log file or setup target files for the reports you can use special macro variables in the file name:
    %d% -Current day as a number without a leading zero (1-31).
    %dd% -Current day as a number with a leading zero (01-31).
    %ddd% -Current day as an abbreviation (Sun-Sat) using system's regional settings.
    %dddd% -Current day as a full name (Sunday-Saturday) using system's regional settings.
    %ddddd%-Current date using the short date format (see Windows Regional Options).
    %dddddd%-Current date using the long date format.
    %ww% -Current week as a number with a leading zero (01-54).
    %m% -Current month as a number without a leading zero (1-12).
    %mm% -Current month as a number with a leading zero (01-12).
    %mmm% -Current month as an abbreviation (Jan-Dec) using system's regional settings.
    %mmmm% -Current month as a full name (January-December) using system's regional settings.
    %yy% -Current year as a two-digit number (00-99).
    %yyyy% -Current year as a four-digit number (0000-9999).
    %/% -Displays the date separator character given by the DateSeparator system variable.
    Macro variables may be written in upper case as well as in lower case letters - both produce the same result.
    Examples:
      c:\HostMonitor\Logs\%DDMMYYYY%.DBF
      c:\HostMonitor\Reports\%mm-dd-yy%.html